package com.zjyd.douyangcommoncore.exception;

import cn.dev33.satoken.exception.NotLoginException;
import com.zjyd.douyangcommoncore.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@Slf4j
@RestControllerAdvice
public class AuthExceptionHandler {

    @ExceptionHandler(NotLoginException.class)
    public Result notLoginException(){
        return Result.error("请先登录");
    }
}
